package cn.shengchao.examstar.knowledge.application.command;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 批量更新知识点掌握度命令
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UpdateMultiKnowledgeMasteryCommand {
    
    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空")
    private Long userId;
    
    /**
     * 学习计划ID
     */
    @NotNull(message = "学习计划ID不能为空")
    private Long studyPlanId;
    
    /**
     * 知识点掌握度列表
     */
    @NotEmpty(message = "知识点掌握度列表不能为空")
    @Valid
    private List<KnowledgeMasteryItem> masteryList;
    
    /**
     * 知识点掌握度项
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class KnowledgeMasteryItem {
        
        /**
         * 知识点ID
         */
        @NotNull(message = "知识点ID不能为空")
        private Long knowledgePointId;
        
        /**
         * 掌握程度
         */
        private String degreeOfMastery;
        
        /**
         * 正确率
         */
        @NotNull(message = "正确率不能为空")
        private String accuracyRate;
    }
} 